/**
 * 
 */
package com.acc.softmgr.common.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.acc.softmgr.common.interceptor.SessionInterceptor;

/**
 * 
 * @content 拦截器配置中心
 * 
 * @date 2017年5月16日
 * 
 * @author OprCalf
 * 
 */
@Configuration
public class InterceptorConfiguration extends WebMvcConfigurerAdapter {

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		InterceptorRegistration ir = registry.addInterceptor(new SessionInterceptor());
		ir.addPathPatterns("/**");
		ir
		.excludePathPatterns("/")
		.excludePathPatterns("/sysUser/checkUser")
		.excludePathPatterns("/swagger-resources")
		.excludePathPatterns("/v2/api-docs")
		.excludePathPatterns("/configuration/security")
		.excludePathPatterns("/configuration/ui")
		.excludePathPatterns("/softmgrApi/*");

	}
}
